﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace SystemDiagramNew.SystemDiagramLegend
{
	public partial class ListSearchLegendForm : System.Windows.Forms.Form
	{
		public ListSearchLegendForm(List<TreeNode> treeNodeList)
		{
			this.m_TreeNodeList.AddRange(treeNodeList);
			this.InitializeComponent();
			foreach (TreeNode treeNode in this.m_TreeNodeList)
			{
				this.listBoxSearchLegend.Items.Add(treeNode.Text);
			}
			this.listBoxSearchLegend.SelectedIndex = 0;
		}

		public TreeNode SelectNode
		{
			get
			{
				return this.m_TreeNodeList[this.listBoxSearchLegend.SelectedIndex];
			}
		}

		private readonly List<TreeNode> m_TreeNodeList = new List<TreeNode>();
	}
}
